"																													\n\
#ifdef GL_ES																										\n\
precision lowp float;																								\n\
#endif																												\n\
																													\n\
varying vec2 v_texCoord;																							\n\
uniform vec4 u_ColorControl[8];																						\n\
uniform float u_RatioControl[8];																					\n\
uniform float u_isLinear;																							\n\
uniform	   int u_use_cxform;																						\n\
uniform    vec4 u_cxform_mult_color;																				\n\
uniform    vec4 u_cxform_add_color;																					\n\
																													\n\
																													\n\
void main()																											\n\
{																													\n\
	float current_ratio = 0.0;																						\n\
	if(u_isLinear > 0.1){																							\n\
		current_ratio = (v_texCoord.x + 16384) / 32768;																\n\
	}																												\n\
	else {																											\n\
		current_ratio = clamp( ( sqrt(v_texCoord.x * v_texCoord.x + v_texCoord.y * v_texCoord.y ) ) / 16384, 0.0, 1.0 ); \n\
	}																												\n\
																													\n\
																													\n\
	if( current_ratio <= u_RatioControl[0] ){																		\n\
		gl_FragColor =  u_ColorControl[0];																			\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[1]){																	\n\
		float coefL = u_RatioControl[0];																			\n\
		vec4 colorL = u_ColorControl[0];																			\n\
		float coefR = u_RatioControl[1]; 																			\n\
		vec4 colorR = u_ColorControl[1]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[2]){																	\n\
		float coefL = u_RatioControl[1];																			\n\
		vec4 colorL = u_ColorControl[1];																			\n\
		float coefR = u_RatioControl[2]; 																			\n\
		vec4 colorR = u_ColorControl[2]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[3]){																	\n\
		float coefL = u_RatioControl[2];																			\n\
		vec4 colorL = u_ColorControl[2];																			\n\
		float coefR = u_RatioControl[3]; 																			\n\
		vec4 colorR = u_ColorControl[3]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[4]){																	\n\
		float coefL = u_RatioControl[3];																			\n\
		vec4 colorL = u_ColorControl[3];																			\n\
		float coefR = u_RatioControl[4]; 																			\n\
		vec4 colorR = u_ColorControl[4]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[5]){																	\n\
		float coefL = u_RatioControl[4];																			\n\
		vec4 colorL = u_ColorControl[4];																			\n\
		float coefR = u_RatioControl[5]; 																			\n\
		vec4 colorR = u_ColorControl[5]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[6]){																	\n\
		float coefL = u_RatioControl[5];																			\n\
		vec4 colorL = u_ColorControl[5];																			\n\
		float coefR = u_RatioControl[6]; 																			\n\
		vec4 colorR = u_ColorControl[6]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else if(current_ratio <= u_RatioControl[7]){																	\n\
		float coefL = u_RatioControl[6];																			\n\
		vec4 colorL = u_ColorControl[6];																			\n\
		float coefR = u_RatioControl[7]; 																			\n\
		vec4 colorR = u_ColorControl[7]; 																			\n\
																													\n\
		if( coefR > 1.0 ){																							\n\
			gl_FragColor = colorL;																					\n\
		}																											\n\
		else{																										\n\
			float coefDistance = coefR - coefL;																		\n\
			float coefBetween = (current_ratio - coefL) / coefDistance;												\n\
																													\n\
			gl_FragColor =  (colorL*(1.0-coefBetween)) + (colorR*(coefBetween));									\n\
		}																											\n\
	}																												\n\
	else{																											\n\
		gl_FragColor = u_ColorControl[7];																			\n\
	}																												\n\
																													\n\
																													\n\
	if( u_use_cxform != 0){																							\n\
		gl_FragColor.r = max(0, min(((gl_FragColor.r * u_cxform_mult_color.r) ) + u_cxform_add_color.r, 1));		\n\
		gl_FragColor.g = max(0, min(((gl_FragColor.g * u_cxform_mult_color.g) ) + u_cxform_add_color.g, 1));		\n\
		gl_FragColor.b = max(0, min(((gl_FragColor.b * u_cxform_mult_color.b) ) + u_cxform_add_color.b, 1));		\n\
		gl_FragColor.a = max(0, min(((gl_FragColor.a * u_cxform_mult_color.a) ) + u_cxform_add_color.a, 1));		\n\
	}																												\n\
}                                                                       											\n\
";